package com.luzhikun.java;

import com.luzhikun.java1.MyAnnotation;

/**
 * @author shkstart
 * @create 2021-03-02 19:33
 */
@MyAnnotation(value = "he")
public class Person {
    private String name;
    public int age;

    public Person() {
    }

    @MyAnnotation(value = "hi")
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    private Person(String name) {
        this.name = name;

    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @MyAnnotation()
    public void show() {
        System.out.println("我是一个人");

    }

    private void showNation() {
        System.out.println("我的国籍是中国");

    }
}
